import Taro from "@tarojs/taro";
import { View,Image,Text,Button } from "@tarojs/components";
import './index.scss'

export default function SpecialRecruitCard(props){

  const recruitInfo=props.Info;
  // console.log(recruitInfo);
  const detailInfo=()=>{
      Taro.navigateTo({
        url:`/pages/recruitDetail/recruitDetail?id=${recruitInfo.id}`
      })
  }

  return(
    <View className='companyCard' >
      <View className='at-row'>
        <View className='SpecialcompanyImage'>
        <Image className='SpecialcompanyImage at-col ' mode='heightfix' src={'data:image/png;base64,'+recruitInfo.photo} />
        </View>
          <View className='at-col '>
               <View className='recruitName'>
                    {recruitInfo.recruitName.length>=16
                    ?recruitInfo.recruitName.slice(0,12)+'....'
                   :recruitInfo.recruitName
                  }
               </View>


               <View className='recruitTime'>
              {recruitInfo.recruitStartTime}-{recruitInfo.recruitEndTime}
               </View>

          <View className='companyFeature at-row'>
          <View className='specialcompanyFeature_item at-col at-col-5'  >{recruitInfo.companyCount}家企业</View>
          <View className='specialcompanyFeature_item at-col at-col-5'  >{recruitInfo.positionCount}个岗位</View>
          </View>

          <Button className='detailButton' onClick={detailInfo} >查看详情</Button>
          </View>
      </View>
    </View>
  )
}